import {
  defineComponent,
  useCssVars,
  computed,
  ref,
  resolveDirective,
  unref,
  withDirectives,
  openBlock,
  createElementBlock,
  createTextVNode,
  toDisplayString,
  normalizeClass,
  createCommentVNode
} from "vue";
import { b as useProp, _ as _export_sfc } from "./index-CEDaTd93.js";
const _hoisted_1 = { key: 0 };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "StaticText",
  props: {
    component: {}
  },
  setup(__props) {
    useCssVars(_ctx => ({
      f441f5cc: lineHeight.value
    }));
    const props = __props;
    const { propValue } = useProp(props.component);
    const customeText = computed(() => {
      return propValue.base.text;
    });
    const lineHeight = ref("20px");
    const resizeHandler = entry => {
      const { height } = entry.contentRect;
      lineHeight.value = `${height}px`;
    };
    return (_ctx, _cache) => {
      const _directive_resize = resolveDirective("resize");
      return unref(propValue).base.type === "text"
        ? withDirectives(
            (openBlock(),
            createElementBlock("span", _hoisted_1, [
              createTextVNode(toDisplayString(customeText.value), 1)
            ])),
            [[_directive_resize, resizeHandler]]
          )
        : unref(propValue).base.type === "symbol"
        ? withDirectives(
            (openBlock(),
            createElementBlock(
              "span",
              {
                key: 1,
                class: normalizeClass(["icon", "iconfont", customeText.value])
              },
              null,
              2
            )),
            [[_directive_resize, resizeHandler]]
          )
        : createCommentVNode("", true);
    };
  }
});
const StaticText = /* @__PURE__ */ _export_sfc(_sfc_main, [
  ["__scopeId", "data-v-5f4c0713"]
]);
export { StaticText as default };
